<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* 
      function initBreak_Dynamic(n) {
        // 2 - 4的情况
        if (n === 2) return 1
        if (n === 3) return 2
        if (n === 4) return 4
        let result = 1
        // n比4大时拆分出3，和3乘
        while (n > 4) {
          result *= 3
          // 减去3
          n -= 3
        }
        // result和剩余的n相乘
        result *= n
        return result
      }

      let res2 = initBreak_Dynamic(6)
      console.log(res2)
      // let res1 = initBreak_Dynamic(10)
      // console.log(res1)
    */

  </script>
</body>

</html>